From: Benjamin Otte Date: Sat, 11 Jun 2011 08:44:16 +0000 (+0200) Subject: styleproperty: Resolve NULL RGBAs to pink X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~21064 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=3a1da7f09c2a5cc58cdd75c7ff46929b2c4848fc;p=gtk%2B3.0.git styleproperty: Resolve NULL RGBAs to pink .. instead of returning NULL and crashing. Fixes no-colors reftest --- diff --git a/gtk/gtkstyleproperty.c b/gtk/gtkstyleproperty.c index ee3ce04e86..e8a2114e89 100644 --- a/gtk/gtkstyleproperty.c +++ b/gtk/gtkstyleproperty.c @@ -1989,6 +1989,11 @@ _gtk_style_property_resolve (const GtkStyleProperty *property, g_value_init (val, property->pspec->value_type); _gtk_style_property_default_value (property, props, val); } + else if (G_VALUE_TYPE (val) == GDK_TYPE_RGBA) + { + if (g_value_get_boxed (val) == NULL) + _gtk_style_property_default_value (property, props, val); + } else if (G_VALUE_TYPE (val) == GTK_TYPE_GRADIENT) { g_return_if_fail (property->pspec->value_type == CAIRO_GOBJECT_TYPE_PATTERN);